Skip to content

Keep authority posture optional in NetEngine specs#173

Merged
aidankhogg merged 1 commit into
dev/alphafrom
codex/maintain-backward-compatibility-for-netenginespec
Jun 30, 2026
Merged

Keep authority posture optional in NetEngine specs#173
aidankhogg merged 1 commit into
dev/alphafrom
codex/maintain-backward-compatibility-for-netenginespec

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Preserve backwards compatibility so existing example YAMLs continue to parse without requiring a new top-level authorities section.
  • Allow introducing authority posture as an importable domain object and opt-in overrides while deriving sensible defaults from existing spec fields.
  • Provide generation helpers that honor optional overrides but fall back to stable defaults for the MVP.

Description

  • Add AuthorityPosture Pydantic model to netengine.spec.models to represent optional authority posture overrides.
  • Add an optional authority: AuthorityPosture | None = None field to NetEngineSpec so old specs remain valid when omitted.
  • Re-export AuthorityPosture from netengine.spec for importability alongside existing authority domain objects.
  • Update world_manifest_from_spec in netengine/spec/authority.py to honor provided posture overrides while deriving defaults from existing top-level spec sections when authority is absent, and add tests exercising both behaviors.

Testing

  • Ran pytest tests/test_authority_spec.py tests/test_spec_parsing.py -q and the tests passed.
  • Ran pytest -q (full test suite) which completed successfully with 627 passed, 10 skipped.
  • Loaded the example specs with load_spec for examples/minimal.yaml, examples/single-org.yaml, and examples/dev-sandbox.yaml and confirmed each parsed with authority is None.

Codex Task

@aidankhogg aidankhogg merged commit a25aeb3 into dev/alpha Jun 30, 2026
@aidankhogg aidankhogg deleted the codex/maintain-backward-compatibility-for-netenginespec branch June 30, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant